import request from '@/utils/request'
import type { MenuResponse, SystemUserResponse, UpdateRightResponse, UpdateRightParams, GetUserRightParams } from './types/permission'

export function getMenuList(params: GetUserRightParams) {
  return request.get<MenuResponse>('/account/right', { params })
}

export function getSystemUsers() {
  return request.get<SystemUserResponse>('/account/systeruser')
}

export function updateRight(data: UpdateRightParams) {
  return request.put<UpdateRightResponse,UpdateRightResponse>('/account/right', data)
} 